package mn.idax.exchange.otc.mapper;

import mn.idax.exchange.otc.domain.SimpleUserLanguage;
import mn.idax.exchange.otc.entity.UserLanguage;
import mn.idax.exchange.otc.entity.UserLanguageExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface UserLanguageMapper {
    int countByExample(UserLanguageExample example);

    int deleteByExample(UserLanguageExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(UserLanguage record);

    int insertSelective(UserLanguage record);

    List<UserLanguage> selectByExampleWithRowbounds(UserLanguageExample example, RowBounds rowBounds);

    List<UserLanguage> selectByExample(UserLanguageExample example);

    UserLanguage selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") UserLanguage record, @Param("example") UserLanguageExample example);

    int updateByExample(@Param("record") UserLanguage record, @Param("example") UserLanguageExample example);

    int updateByPrimaryKeySelective(UserLanguage record);

    int updateByPrimaryKey(UserLanguage record);

    //queryLanguageByUserId
    List<UserLanguage> queryLanguageByUserId(@Param("userId") Integer userId);

    List<SimpleUserLanguage> getBuyerAndSellerSimpleLanguage(@Param("buyer")Integer buyer, @Param("seller")Integer seller);

    SimpleUserLanguage getUsererSimpleLanguage(@Param("userId")Integer userId);
}